package com.bt.dmdb.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ODS_PROP_MILESTONE")
@SuppressWarnings("serial")
public class PropMilestone implements java.io.Serializable {

    private long id;
    private Prop prop;
    private Project project;
    private Integer milestoneNumber;
    private String name;
    private String predecessors;
    private Long plannedDuration;
    private String updateMethod;
    private Character priorityFlag;

    public PropMilestone() {
    }

    public PropMilestone(long id, Prop prop) {
        this.id = id;
        this.prop = prop;
    }

    public PropMilestone(long id, Prop prop, Project project, Integer milestoneNumber, String name, String predecessors, Long plannedDuration, String updateMethod, Character priorityFlag) {
        this.id = id;
        this.prop = prop;
        this.project = project;
        this.milestoneNumber = milestoneNumber;
        this.name = name;
        this.predecessors = predecessors;
        this.plannedDuration = plannedDuration;
        this.updateMethod = updateMethod;
        this.priorityFlag = priorityFlag;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROP_ID", nullable = false)
    public Prop getProp() {
        return this.prop;
    }

    public void setProp(Prop prop) {
        this.prop = prop;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROJECT_ID")
    public Project getProject() {
        return this.project;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    @Column(name = "MILESTONE_NUMBER", precision = 5, scale = 0)
    public Integer getMilestoneNumber() {
        return this.milestoneNumber;
    }

    public void setMilestoneNumber(Integer milestoneNumber) {
        this.milestoneNumber = milestoneNumber;
    }

    @Column(name = "NAME")
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "PREDECESSORS")
    public String getPredecessors() {
        return this.predecessors;
    }

    public void setPredecessors(String predecessors) {
        this.predecessors = predecessors;
    }

    @Column(name = "PLANNED_DURATION", precision = 10, scale = 0)
    public Long getPlannedDuration() {
        return this.plannedDuration;
    }

    public void setPlannedDuration(Long plannedDuration) {
        this.plannedDuration = plannedDuration;
    }

    @Column(name = "UPDATE_METHOD", length = 20)
    public String getUpdateMethod() {
        return this.updateMethod;
    }

    public void setUpdateMethod(String updateMethod) {
        this.updateMethod = updateMethod;
    }

    @Column(name = "PRIORITY_FLAG", length = 1)
    public Character getPriorityFlag() {
        return this.priorityFlag;
    }

    public void setPriorityFlag(Character priorityFlag) {
        this.priorityFlag = priorityFlag;
    }
}
